<!DOCTYPE html>
<html lang="en">
<head>
  <title>浩然企业级管理平台</title>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"
        name="viewport">
  <#include "/common/csslib.html">
</head>
<body>
<div class="main-wrapper">
  <!-- start: MAIN CONTAINER -->
  <div class="main-container inner">
    <!-- start: PAGE -->
    <div class="main-content">
      <div class="container">
        <div class="row h-home-path">
          <div class="col-md-12">
            <ol class="breadcrumb">
              <li><i class="fa fa-home"></i>&nbsp;&nbsp;所在位置</li>
              <li>首页</li>
              <li class="active">编辑信息</li>
            </ol>
          </div>
        </div>
        <div class="row h-main-search">
          <form action="javascript:;" method="post">
            <div class="pull-right h-btn-group">
              <button class="btn btn-info" id="return-btn" onclick="returnIndex()"><i class="fa fa-mail-reply">&nbsp;&nbsp;</i>返回
              </button>
              <@permission btnType="save" btnId="saveBtn" btnValue="保存" op="process:actReModel:save"
              btnMethod="ActReModelMgr.submitForm()"/>
            </div>
          </form>
        </div>

        <div class="form-horizontal  h-form-warp">
          <div class="h-msg-title h-table-header">
            <strong>信息</strong>
          </div>
          <form action="/actReModel/saveActReModel" class="form-horizontal" id="actReModelForm" method="post"
                role="form">
            <input id="operation" name="operation" type="hidden" value="${operation}"/>
            <input class="form-control" id="id_" name="id_" type="hidden" value="${actReModel.id_!}">
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="id_" name="id_" required="required" type="text"
                       value="${actReModel.id_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="rev_" name="rev_" required="required" type="text"
                       value="${actReModel.rev_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="name_" name="name_" required="required" type="text"
                       value="${actReModel.name_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="key_" name="key_" required="required" type="text"
                       value="${actReModel.key_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="category_" name="category_" required="required" type="text"
                       value="${actReModel.category_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label">：</label>
              <div class="col-sm-8">
                <input class="form-control Wdate" id="createTime_" name="createTime_" onFocus="WdatePicker()"
                       required="required" type="text"
                       value="${actReModel.createTime_}!"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label">：</label>
              <div class="col-sm-8">
                <input class="form-control Wdate" id="lastUpdateTime_" name="lastUpdateTime_"
                       onFocus="WdatePicker()" required="required" type="text"
                       value="${actReModel.lastUpdateTime_}!"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="version_" name="version_" required="required" type="text"
                       value="${actReModel.version_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="metaInfo_" name="metaInfo_" required="required" type="text"
                       value="${actReModel.metaInfo_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="deploymentId_" name="deploymentId_" required="required"
                       type="text"
                       value="${actReModel.deploymentId_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="editorSourceValueId_" name="editorSourceValueId_"
                       required="required" type="text"
                       value="${actReModel.editorSourceValueId_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="editorSourceExtraValueId_" name="editorSourceExtraValueId_"
                       required="required" type="text"
                       value="${actReModel.editorSourceExtraValueId_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label"> ：</label>
              <div class="col-sm-8">
                <input class="form-control" id="tenantId_" name="tenantId_" required="required" type="text"
                       value="${actReModel.tenantId_!}"/>
              </div>
              <div class="col-sm-1">
                <span class="required">*</span>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
    <!-- end: PAGE -->
  </div>
  <!-- end: MAIN CONTAINER -->
</div>

<#include "/common/jslib.html">
<!-- 弹窗下拉 -->
<script type="text/javascript">
    function returnIndex() {
        window.location.href = "/actReModel/query";
    }

    $(function () {
        // 页面操作类型：add(添加)-edit(编辑)-view(查看)
        var operation = $("#operation").val();
        // 弹出窗体控制
        ActReModelMgr = {
            // 初始化
            init: function () {
                // 查看的时候不显示保存按钮
                if (operation == "view") {
                    Jmts.setFormReadOnly();
                }
                initAmtAndRate();
            },
            // init end

            // 提交数据
            submitForm: function () {
                Jmts.convertAmtAndRate();//反格式化金额和利率，以防保存出错
                Jmts.ajaxSubmit(document.getElementById("actReModelForm"), function (result) {
                    if (result.success) {
                        if (operation == 'add') {
                            ActReModelMgr.returnIndex();
                        } else {
                            Jmts.succTips(result.msg);
                            window.location.reload();
                        }
                    } else {
                        Jmts.revertAmtAndRate();
                        Jmts.warnTips(result.msg);
                    }
                });
                return false;
            },
            // submitForm end
            returnIndex: function () {
                window.location.href = "/actReModel/query";
            }
        };
        // 执行初始化
        ActReModelMgr.init();
        // 前台验证表单
        $("#actReModelForm").validate();
    });
</script>
</body>
</html>
